<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('下派办理期限配置')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-config-add" name="form-config-add" th:object="${deptDeadLine}">
        <input name="id" th:value="${deptDeadLine?.id}" type="hidden">
        <div class="col-sm-12">
            <div class="form-group">
                <label class="col-xs-4 control-label-new">延后工作日天数：</label>
                <div class="col-xs-8">
                    <input class="form-control" style="width: 80px;" id="delayDays" name="delayDays" th:value="${deptDeadLine?.delayDays}" type="text">
                </div>
            </div>
        </div>
        <div class="row" style="margin-top:50px;">
            <div class="col-xs-offset-5 col-xs-10">
                <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "system/deptdeadline";

    $("#form-config-add").validate({
        rules: {
            onkeyup: false,
            delayDays: {
                digits: true,
                range:[1,5]
            },
        },
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/save", $('#form-config-add').serialize());
        }
    }


</script>
</body>
</html>
